package cn.semcorp.zhuhaizj.quartzJob;

import cn.semcorp.zhuhaizj.repo.IRedisRepository;
import cn.semcorp.zhuhaizj.services.impl.UtilizationServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;


@Slf4j
public class TobeUtilizationJob implements Job {

    @Autowired
    private UtilizationServiceImpl utilizationService;
    @Autowired
    private IRedisRepository redisRepository;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        // 定时任务待写
        log.info("定时任务:Redis涂布车间缓存加入-开始执行");
        tobeWorkshop();
        log.info("定时任务:Redis涂布车间缓存加入-执行完成!");
    }


    /**
     * 监控涂布车间
     */
    public void tobeWorkshop(){
        redisRepository.deleteCoatingWorkshop();
    }

}
